package org.example.learn;

import java.util.WeakHashMap;

/**
 * @author Administrator
 */
public class MyWeakHashMap {

    public static void main(String[] args) {
        myWeakhash();
    }

    private static void myWeakhash(){
        WeakHashMap<Integer,String> map = new WeakHashMap<>();
        Integer key = new Integer(2);
        String value="www";

        map.put(key,value);

        System.out.println(map);

        key=null;
        System.out.println(map);

    }
}
